/*
 * @Author: your name
 * @Date: 2022-01-03 23:44:30
 * @LastEditTime: 2022-01-04 21:14:28
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /ac_interface/test/test.js
 */

const WebSocket = require("ws");


// let fs = require('fs');
// let proc = require('child_process');

// class SSH{
//     constructor(host, port=22, username, password){
//         this.ssh = null;
//         this.host = host;
//         this.port = port;
//         this.username = username;
//         this.password = password;
//     }

//     command(cmd) {
//         proc.exec('node ./ssh2shell.js ' + this.host + ' ' + this.username + ' ' + this.password + ' ' + cmd);
//         let data = fs.readFileSync('./cmd.txt');
//         return data;
//     }
// }

// let s = new SSH('172.21.4.154', 22, 'root', 'Nibushiwo351351');
// let ret =  s.command('ls');
// console.log(ret.toString());

// let a = [1,2,3];
// let temp = a[a.length-1];
// a[a.length-1] = a[1];
// a[1] = temp;
// a.pop();

// console.log(a);


let ws = new WebSocket('ws://172.21.4.154:4002');
console.log(ws);